package com.cn.test1.service;

import com.cn.test1.data.HeadData;
import com.cn.test1.model.HeadModel;

import java.util.ArrayList;
import java.util.List;

public class HeadService {
    public HeadModel getHeadModel(){
        HeadData headData = new HeadData();
        HeadModel headModel = new HeadModel();
        headModel.setLogo(headData.getLogo());
        headModel.setName(headData.getName());
        return  headModel;
    }
    public List<HeadModel> getHeadModelList(){
        List<HeadModel> list = new ArrayList<>();
        HeadData headData =new HeadData();
        for(int i = 0; i< headData.navtitles.length; i++){
            HeadModel headModel = new HeadModel();
            headModel.setNavtitles(headData.navtitles[i]);
            headModel.setHrefs(headData.hrefs[i]);
            list.add(headModel);
        }
        return list;
    }
}
